﻿<%@page import="java.util.*" %>
<%
	if(session.getAttribute("hotelId") != null)
	{
		Long hotelId = (Long)session.getAttribute("hotelId");
		Long userId = (Long)session.getAttribute("userid");
		Long xWorkArea = (Long)session.getAttribute("workArea");
		Long xCounter = (Long)session.getAttribute("counter");
		String xPageType = (String)session.getAttribute("pageType");
		if(hotelId != 0 && userId != null && xPageType != null && xCounter != null){
			if(xPageType.equals("F")){
				response.sendRedirect("task.jsp"); 
				return;
			}else if(xPageType.equals("A")){
				response.sendRedirect("/adminconsole/"); 
				return;
			}else if(xPageType.equals("H")){
				System.out.println("house keeping");
				response.sendRedirect("/HouseKeeping/"); 
				return;
			}else if(xPageType.equals("P")){
				response.sendRedirect("/POS/"); 
				return;
			}
		}else if(hotelId == 0 && userId == null && xWorkArea == null){
			response.sendRedirect("/index.jsp");
			return;
		}
	}else{
		response.sendRedirect("/index.jsp");
		return;
	}
%>

<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>Chose Work Area | Eem tech soft</title>
		<link href="/css/ChoseCounter/chosecounter.css" rel="stylesheet" />
        <link href="/css/ChoseCounter/opencounter.css" rel="stylesheet" />
		<link href="/css/ChoseCounter/SharedCssOnlyClass.css" rel="stylesheet" />
		<link href="/css/components/blocked/popup/popup.css" rel="stylesheet" />
		<link href="css/custom/jquery-ui-1.9.1.custom.css" rel="stylesheet" />
		<link href="css/custom/loading.css" rel="stylesheet" />
		<link href="/css/components/blocked/popup/popup.css" rel="stylesheet" />
		<link href="/css/Adminconsole/dialog.css" rel="stylesheet" />  
		<link href="/css/custom/loading.css" rel="stylesheet" />

		<script src="/js/jquery-1.8.3.min.js"></script>
		<script src="/js/jquery-ui-1.9.1.custom.min.js"></script>
		<script src="/js/FrontFunction.js "></script>
		<script src="/js/components/login/choseworkarea.js"></script>
		<script src="/js/loading.js"></script>
		<script src="/js/simpleservice.js"></script>
		<script src="/js/sharedData.js"></script>
        <script src="/js/pointerDialog.js"></script>
        <script src="/js/adminconsole/EditDialog.js"></script>
		<jsp:include page="/language.jsp" flush="true" />
	</head>
	<body >
		<div class="header">
			<div style="display:inline-block">
				<img src="/images/POS/index/hotelIcon.png" class="icon_hotel">
			</div>
			<div class="setting_icon_header">
			<div class="header_icon rightIconheader1"></div>
			<div class="header_icon rightIconheader2"></div>
			</div>
		</div>
		<div class="content">
			<div id="top_side">
				<table style="width:100%;height:200px;">
					<tr>
						<td style="width:50%;border-right: 2px solid #f0f0f0;">
							<table>
								<tr>
									<td style="width:40%">
										<div id="pic">
											<img src="/images/POS/index/hotelIcon.png" class="pic4profile">
										</div>
										<div id="editProfile">
											<span class="link">Change your picture</span>
											</br>
											<span class="link">Edit your profile</span>
										</div>
									</td>
									<td>
										<div id="welcome" style="font-size: 20px;">Welcome</div>
										<div>
											<span style="font-size: 15px;" name="fullname">-</span>
										</div>
										</br>
										<div class="font12 margin5">
											<span class="logo">
												<img src="/images/LogIn/level.png" class="pic4profile">
											</span>
											<span id="userlevel">-</span>
										</div>
										<div class="font12 margin5">
											<span class="logo">
												<img src="/images/LogIn/work.png" class="pic4profile">
											</span>
											<span id="hotelname">-</span>
										</div>
										<div class="font12 margin5">
											<span class="logo">
												<img src="/images/LogIn/email.png" class="pic4profile">
											</span>
											<span id="email">-</span>
										</div>
									</td>
								</tr>
							</table>
						</td>
						<td>
							<table style="width:100%;">
								<tr style="vertical-align:middle">
									<td style="width:25px">
										<img src="/images/LogIn/message.png">
									</td>
									<td>
										<div style="font-size:20px;">
											Dear, <span style="font-weight:bold" name="fullname">-</span>
										</div>
									</td>
								</tr>
								<tr>
									<td>&nbsp;</td>
									<td>
										<div class="font14">
											<div>
												Your last night Audit date is <span class="link" id="lastNightAudit">-</span>.
											</div>
											<div>Night Audit should be done once every day.</div>
											</br>
											<div style="font-size:10px">Thank you.</br>EEM TECH Coporation</div>
											</br>
											<div style="font-size:10px">
												<span class="link">
													How to perform Night Audit video?
												</span>
												</br>
												<span class="link">
													How to use?
												</span>
											</div>
										</div>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
			<div id="workarea" class="workArea" style="width:100%;display:none">
				<table style="width:100%">
					<tr>
						<td style="height:20px;padding:0px">
							<div style="font-size:30px;padding:5px 50px">Working Area</div>
						</td>
					</tr>
					<tr>
						<td class="headworkarea">&nbsp;</td>
					</tr>
					<tr>
						<td>
							<div>
								<div style="padding:15px 50px">
									* Select Your Working Area
								</div>
								<div style="text-align:center;height:150px;padding:25px 50px">
								<table id="arealist"></table>
								</div>
							</div>
						</td>
					</tr>
				</table>
			</div>
			<div id="counter" class="workArea" style="width:100%;display:none">				
				<table style="width:100%;border-spacing: 0;border-collapse: collapse;">
					<tr>
						<td style="height:20px;padding:0px">
							<div style="font-size:30px;padding:0px 50px 0px 50px;line-height: 45px;"><span>Frontdesk</span> <span style="font-weight:bold">&lt;</span> <span style="font-weight:bold">Counter</span><span class="link" style="float:right;font-size:10px">< Back to Select Your Working Area</span></div>
						</td>
					</tr>
					<tr>
						<td class="headcounter">&nbsp;</td>
					</tr>
					<tr>
						<td style="border-left: 2px solid #CFCFCF;
border-bottom: 2px solid #CFCFCF;border-right: 2px solid #CFCFCF;background-color: #E2E2E2;">
							<div style="background-color:#E2E2E2;">
								<div style="padding:5px 50px">
									* Select Your Working Area
								</div>
								<div style="text-align:center;height:150px;padding:25px 50px;">
								<select id="counterlist" style="margin-top:50px;">
								</select>
								</div>
							</div>
						</td>
					</tr>
					<tr>
						<td style="text-align:center;"><input class="100width" name="" type="button" value="Back" onClick="deleteSession()"><input class="100width" type="button" value="Continue" onClick="next()"></td>
					</tr>
				</table>
			</div>
		</div>
	<div class="footer">
		<table style="width:100%;text-align:center">
			<tr>
				<td style="width:60%;text-align:left">Coppyright EEM Tech Soft co., Itd.</td>
				<td>For assistance, please contact us on <span class="link">support@emmtech.com</span></td>
				<td>|</td>
				<td><span class="link">Select Language</span></td>
			</tr>
		</table>
	</div>
	<div id="loginFail" title="Login Incorrect" style="display:none">
		<p>Please check your HotelId E-mail and Password</p>
	</div>
	<div id="loginShort" title="Frist Login" style="display:none">
		<p>Please use full hotelId from manager</p>
	</div>
	<div id="loginTimeout" title="Timeout" style="display:none">
		<p>Connection Timeout.</p>
	</div>
	<div id="BlankDialog" style="display:none; padding:5px 0 0 10px;overflow: hidden;"></div>
	<div id="loadingScreen"></div>
	<div name="dynamic" style="display:none"></div>
		<script> 
			var pageType = "<%=(String)session.getAttribute("pageType")%>";
			var counterId = <%=(Long)session.getAttribute("counter")%>;
			choseFunction(pageType,counterId);
		</script>
	</body>
</html>